Numerical C by Philip Joyce

Numerical C by Philip Joyce

Author:Philip Joyce
Language: eng
Format: epub
ISBN: 9781484250648
Publisher: Apress


}

printf("points are
");

for(i=0;i<points;i++)

{

printf("
");

printf("%f %f", xpoints[i], ypoints[i]);

}

printf("
");

fltcnt=(float)points;

/* Calculation of (xbar,ybar)- the mean points*/

/* and sxy and sxx from the formulas*/

xbar=sigmax/fltcnt;

ybar=sigmay/fltcnt;

sxy=(1/fltcnt)*sigmaxy-xbar*ybar;

sxx=(1/fltcnt)*sigmaxsquared-xbar*xbar;

/* calculation of b and a from the formulas */

b=sxy/sxx;

a=ybar-b*xbar;

/* Print the equation of the regression line */

printf("Equation of regression line y on x is
");

printf(" y=%f + %fx", a,b);

printf("
");



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.